Name :Cycle to the right

Symbol :ROR

Illustrate:

    The function of this type module is to move the input parameter 1 "IN" to the right cyclically to the input parameter 2 "N" bit, the result is assigned to the output parameter OUT, the BOOL type still obtains the original value after cyclically shifting any bit, when the displacement number N of BYTE type, USINT type and SINT type exceeds 8, the operation is carried out according to N%8 (remainder), when the displacement number N of UINT type, INT type and WORD type exceeds 16, the operation is carried out according to N%16 (remainder), when the UDINT type, If the shift number N of DINT type and DWORD type exceeds 32, N%32 (remainder) is calculated. 

Image:

Parameter:

Parameter Statement Type Description
IN Input BOOL/BYTE/WORD/DWORD
First input value (operand)
N Input UINT
Second input value (number of right shifts)
OUT Output BOOL/BYTE/WORD/DWORD
Output value

Example:

LD:

ST:



Interpretation:

parameter operandvalue
INTagIn18
NTagIn233
OUTTagOut4
	IN1 and N input the corresponding type of data, and the ROR outputs the result of the cyclic rightward shift.